#ifndef __DRV_CAN_H
#define __DRV_CAN_H
#include "stm32f4xx.h"

#define CAN_SEND_QUEUE_SIZE 	30
#define CAN_REC_QUEUE_SIZE 	30

#define ID_DRIVER_S 	0x00000581//motor driver sendback CAN ID

typedef struct
{
    u16 param1;
    u16 param2;
    u16 param3;
    u16 param4;
}u16Params;

typedef struct
{
    s16 param1;
    s16 param2;
    s16 param3;
    s16 param4;
}s16Params;

typedef struct
{
    u32 param1;
    u32 param2;
}u32Params;

typedef struct
{
    s32 param1;
    s32 param2;
}s32Params;

typedef struct
{
    float param1;
    float param2;
}floatParams;

typedef struct
{
    s32 param1;
    float param2;
}s32floatParams;

typedef struct  {
  u32 id;                 /* 29 bit identifier                               */
  u8  data[8];            /* Data field                                      */
  u8  len;                /* Length of data field in bytes                   */
  u8  ch;                 /* Object channel                                  */
  u8  format;             /* 0 - STANDARD, 1- EXTENDED IDENTIFIER            */
  u8  type;               /* 0 - DATA FRAME, 1 - REMOTE FRAME                */
} CAN_msg;

u8 CANSendMsg(u8* msg, u32 send_id, u32 CANframeExtType, u32 CANframeRemoteType,u8 len);


#endif
/*************************** END OF FILE DRV_CAN.H *****************************8*/